package com.dragon.mmochat.model.enumType;

import java.awt.Color;

//注：一旦发版,如果此enum会存到数据库，则此类型只能增加,不能减少或修改名字
public enum MmochatEquipQualityType {
	白装(1, Color.white), 蓝装(2, Color.cyan), 粉装(3, Color.magenta), 金装(4,
			Color.yellow), 绿装(5, Color.green);

	int prority;
	Color color;

	MmochatEquipQualityType(int prority, Color color) {
		this.prority = prority;
		this.color = color;
	}

	public int getPrority() {
		return prority;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public static MmochatEquipQualityType get(int value) {
		for (MmochatEquipQualityType type : MmochatEquipQualityType.values()) {
			if (type.getPrority() == value) {
				return type;
			}
		}
		return null;
	}
}
